//
//  YSLoadingView.h
//  YSKitDemo
//
//  Created by MOLBASE on 2018/8/15.
//  Copyright © 2018年 YangShen. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, YSLoadingStyle) {
    YSLoadingStyleCircle,      ///< 圆弧转转转
    YSLoadingStyleCircleMask,  ///< 圆弧转转转+尾巴+渐变感
};

@interface YSLoadingView : UIView

+ (instancetype)loadingViewWithFrame:(CGRect)frame style:(YSLoadingStyle)style;

/** 线条宽度：默认4 */
@property (nonatomic, assign) CGFloat lineWidth;

/** 圆弧半径：默认24 */
@property (nonatomic, assign) CGFloat radius;

/** 圆弧的背景颜色：默认半透明黑色 */
@property (nonatomic, strong) UIColor *bgColor;

/** 进度的颜色：默认白色 */
@property (nonatomic, strong) UIColor *strokeColor;

/**
 开始动画
 */
- (void)startLoading;

/**
 结束动画
 */
- (void)stopLoading;

- (void)showFailure;

@end
